import Link from "next/link";
import { Home } from "lucide-react";

export default async function Layout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <div className="min-h-screen bg-gradient-to-br from-indigo-500 via-purple-500 to-pink-500">
      {/* Header */}
      <header className="p-6">
        <Link 
          href="/" 
          className="inline-flex items-center gap-2 px-4 py-2 bg-white/20 hover:bg-white/30 text-white rounded-xl transition-colors duration-200 backdrop-blur-lg"
        >
          <Home className="w-5 h-5" />
          返回首页
        </Link>
      </header>
      
      {/* Content */}
      <div className="flex flex-col items-center justify-center px-6 pb-6">
        <div className="bg-white/10 backdrop-blur-lg rounded-2xl p-8 shadow-xl w-full max-w-md">
          {children}
        </div>
      </div>
    </div>
  );
}
